package Server.network.server;

import Server.Opcodes;
import Server.world.character;

public class Hp_Mp_Exp extends BasePacket{

	public Hp_Mp_Exp(character cha, int type){
		switch(type){
			case 0:
				writeC(Opcodes.S_OPCODE_HPUPDATE);
				writeH(cha.get_currentHp());
				writeH(cha.get_maxHp());
				break;
			case 1:
				writeC(Opcodes.S_OPCODE_MPUPDATE);
				writeH(cha.get_currentMp());
				writeH(cha.get_maxMp());
				break;
			case 2:
				writeC(Opcodes.S_OPCODE_EXP);
				writeC(cha.get_level());
				writeD((int)cha.get_exp());
				break;
		}
	}


	public byte[] send(){

		return getBytes();
	}

}